﻿@model CS795.TravelAgency.Models.CarRentalViewModel

<tr>
    <td>@Model.CarType.ToString()</td>
    <td>@Model.Vendor</td>
    <td>@Model.QuoteId</td>
    <td>@Model.StartDate.ToString("d")</td>
    <td>@Model.EndDate.ToString("d")</td>
    <td>@Model.PricePerDay.ToString("C")</td>
    <td>@Model.TotalPrice.ToString("C")</td>
    <td>@Model.Status</td>
    @if (Model.Status == "Quoted")
    {
        <td>@Html.ActionLink("Reserve", "ReserveCarRental", "Trip", new { id = Model.Id }, null)</td>
    }
    else if (Model.Status == "Reserved")
    {
        <td>
            @Html.ActionLink("Cancel", "CancelCarRental", "Trip", new { id = Model.Id  }, null) | 
            @Html.ActionLink("Confirm", "ConfirmCarRental", "Trip", new { id = Model.Id }, null)
        </td>
    }
    else
    {
        <td></td>
    }
</tr>